package edu.uci.ics.multicast.overlay;

public class Edge {

	private String index;
	private double bandwidth;
	private double latency;
	private MulticastNode source;
	private MulticastNode destination;
	
	public Edge(String index, double bandwidth, double latency, MulticastNode source, MulticastNode destination) {
		this.index = index;
		this.bandwidth = bandwidth;
		this.latency = latency;
		this.source = source;
		this.destination = destination;
	}
	
	public String getIndex() {
		return index;
	}

	public void setIndex(String index) {
		this.index = index;
	}

	public double getBandwidth() {
		return bandwidth;
	}

	public void setBandwidth(double bandwidth) {
		this.bandwidth = bandwidth;
	}

	public void setLatency(double latency) {
		this.latency = latency;
	}

	public double getLatency() {
		return latency;
	}
	
	public void setSource(MulticastNode source) {
		this.source = source;
	}

	public MulticastNode getSource() {
		return source;
	}

	public void setDestination(MulticastNode destination) {
		this.destination = destination;
	}

	public MulticastNode getDestination() {
		return destination;
	}

	@Override
	public String toString() {
		return "Edge [index=" + index + ", bandwidth=" + bandwidth
				+ ", latency=" + latency + ", source=" + source.getIndex()
				+ ", destination=" + destination.getIndex() + "]";
	}

}
